namespace WindowsAPI
{
    /// <summary>DBT.H - Equates for WM_DEVICECHANGE and BroadcastSystemMessage</summary>
    /// <remarks>WM_DEVICECHANGE = 0x0219</remarks>
    public enum DBT : ushort
    {
        AppyBegin = 0x0000,
        AppyEnd = 0x0001,
        DevNodes_Changed = 0x0007,
        /// <summary>sent to ask if a config change is allowed</summary>
        QueryChangeConfig = 0x0017,
        /// <summary>sent when a config has changed</summary>
        ConfigChanged = 0x0018,
        /// <summary>someone cancelled the config change</summary>
        ConfigChangeCanceled = 0x0019,
        MonitorChange = 0x001B,
        /// <summary>he shell has finished login on: VxD can now do Shell_EXEC</summary>
        ShellLoggedOn = 0x0020,
        /// <summary>CONFIGMG ring 3 call. lParam  = CONFIGMG API Packet</summary>
        ConfigMgAPI32 = 0x0022,
        /// <summary>CONFIGMG ring 3 call</summary>
        VXDInitComplete = 0x0023,

        /*
        * Message = WM_DEVICECHANGE
        * wParam  = DBT_VOLLOCK*
        * lParam  = pointer to VolLockBroadcast structure described below
        *
        *      Messages issued by IFSMGR for volume locking purposes on WM_DEVICECHANGE.
        *      All these messages pass a pointer to a struct which has no pointers.
        */
        VolLockQueryLock = 0x8041,
        VolLockLockTaken = 0x8042,
        VolLockLockFailed = 0x8043,
        VolLockQueryUnlock = 0x8044,
        VolLockLockReleased = 0x8045,
        VolLockUnlockFailed = 0x8046,

        No_Disk_Space = 0x0047,
        Low_Disk_Space = 0x0048,

        ConfigMgPrivate = 0x7FFF,

        /*
        * The following messages are for WM_DEVICECHANGE. The immediate list
        * is for the wParam. ALL THESE MESSAGES PASS A POINTER TO A STRUCT
        * STARTING WITH A DWORD SIZE AND HAVING NO POINTER IN THE STRUCT.
        *
        */
        /// <summary>system detected a new device</summary>
        DeviceArrival = 0x8000,
        /// <summary>wants to remove, may fail</summary>
        DeviceQueryreMove = 0x8001,
        /// <summary>removal aborted</summary>
        DeviceQueryreMoveFailed = 0x8002,
        /// <summary>about to remove, still avail</summary>
        DeviceRemovePending = 0x8003,
        /// <summary>device is gone</summary>
        DeviceRemoveComplete = 0x8004,
        /// <summary>type specific event</summary>
        DeviceTypeSpecific = 0x8005,

        /// <summary>user-defined event</summary>
        CustomEvent = 0x8006,

        DevInstEnumerated = 0x8007,  // system detected a new device
        DevInstStarted = 0x8008,  // device installed and started
        DevInstRemoved = 0x8009,  // device removed from system
        DevInstPropertyChanged = 0x800A,  // a property on the device changed

        //Devtyp_Oem = 0x00000000,  // oem-defined device type
        //DevTyp_DevNode = 0x00000001,  // devnode number
        //DevTyp_Volume = 0x00000002,  // logical volume
        //DevTyp_Port = 0x00000003,  // serial, parallel
        //DevTyp_Net = 0x00000004,  // network resource

        //DevTyp_DeviceInterface = 0x00000005,  // device interface class
        //DevTyp_Handle = 0x00000006,  // file system handle

        //DevTyp_DevInst = 0x00000007,  // device instance

        VPowerdAPI = 0x8100,          // VPOWERD API for Win95

        UserDefined = 0xFFFF
    }
}